package com.ruoyi.recycle.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.recycle.domain.IntegralCommodityEvaluate;
import com.ruoyi.recycle.mapper.IntegralCommodityEvaluateMapper;
import com.ruoyi.recycle.service.IIntegralCommodityEvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 积分商品评价Service业务层处理
 *
 * @author Wubk
 * @date 2022-05-22
 */
@Service
public class IntegralCommodityEvaluateServiceImpl extends ServiceImpl<IntegralCommodityEvaluateMapper, IntegralCommodityEvaluate> implements IIntegralCommodityEvaluateService {
    @Autowired
    private IntegralCommodityEvaluateMapper integralCommodityEvaluateMapper;

    /**
     * 查询积分商品评价
     *
     * @param id 积分商品评价主键
     * @return 积分商品评价
     */
    @Override
    public IntegralCommodityEvaluate selectIntegralCommodityEvaluateById(Long id) {
        return integralCommodityEvaluateMapper.selectIntegralCommodityEvaluateById(id);
    }

    /**
     * 查询积分商品评价列表
     *
     * @param integralCommodityEvaluate 积分商品评价
     * @return 积分商品评价
     */
    @Override
    public List<IntegralCommodityEvaluate> selectIntegralCommodityEvaluateList(IntegralCommodityEvaluate integralCommodityEvaluate) {
        return integralCommodityEvaluateMapper.selectIntegralCommodityEvaluateList(integralCommodityEvaluate);
    }

    /**
     * 新增积分商品评价
     *
     * @param integralCommodityEvaluate 积分商品评价
     * @return 结果
     */
    @Override
    public int insertIntegralCommodityEvaluate(IntegralCommodityEvaluate integralCommodityEvaluate) {
        return integralCommodityEvaluateMapper.insertIntegralCommodityEvaluate(integralCommodityEvaluate);
    }

    /**
     * 修改积分商品评价
     *
     * @param integralCommodityEvaluate 积分商品评价
     * @return 结果
     */
    @Override
    public int updateIntegralCommodityEvaluate(IntegralCommodityEvaluate integralCommodityEvaluate) {
        return integralCommodityEvaluateMapper.updateIntegralCommodityEvaluate(integralCommodityEvaluate);
    }

    /**
     * 批量删除积分商品评价
     *
     * @param ids 需要删除的积分商品评价主键
     * @return 结果
     */
    @Override
    public int deleteIntegralCommodityEvaluateByIds(Long[] ids) {
        return integralCommodityEvaluateMapper.deleteIntegralCommodityEvaluateByIds(ids);
    }

    /**
     * 删除积分商品评价信息
     *
     * @param id 积分商品评价主键
     * @return 结果
     */
    @Override
    public int deleteIntegralCommodityEvaluateById(Long id) {
        return integralCommodityEvaluateMapper.deleteIntegralCommodityEvaluateById(id);
    }
}
